package net.shop.dal.entity;

import net.shop.biz.vo.BaseVo;
import ths.web.dal.dao.ValueObjectDao;

public abstract class ValueObjectEntity<T> extends BaseEntity implements ValueObjectDao<T> {

	private static final long serialVersionUID = -1107153878950495572L;
	
	protected T vo;
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public void setVo(T vo) {
		if (vo instanceof BaseVo) {
			((BaseVo) vo).setEntity(this);
		}
		this.vo = vo;
	}

	public abstract T getVo();

}
